# -*- coding: utf-8 -*-
# @File  : fixture.py
# @Author: zbh
# @Date  : 2025/5/19_19:38



import pytest

data3 = [{"user": "admin", "password": "123456"},
         {"user": "super", "password": "654321"},
         {"user": "sysadmin", "password": "321456"}
         ]

@pytest.fixture(params=data3,scope="class")
def get_data(request):
    print("fixture开始执行")
    yield request.param
    print("fixture结束执行")



data2 = [['admin', '12346'], ["super", "654321"], ["sysadmin", '321456']]
@pytest.fixture(params=data2,autouse=True,scope="class")
def get_data2(request):
    print("fixture开始执行2")
    yield request.param
    print("fixture结束执行2")


